package com.fowo.api.service.handleWork;

import com.fowo.api.model.loan.now.balance.LoanNowBalanceBatchFinishRequestPayoutAction;
import com.fowo.api.model.loan.now.balance.LoanNowBalanceFinishRequestPayoutAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class LoanNowBalanceBatchFinishRequestPayout implements LoanNowBalanceBatchFinishRequestPayoutAction {

    @Autowired(required = false)
    protected LoanNowBalanceFinishRequestPayoutAction loanNowBalanceFinishRequestPayoutAction;

    @Override
    public void run(List<Long> idList) throws Exception {
        for(Long id : idList){
            loanNowBalanceFinishRequestPayoutAction.run(id);
        }
    }
}
